/*
 Licensed to Cloudera, Inc. under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  Cloudera, Inc. licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
*/

@import (reference) "hue-mixins.less";

.dashboard-container {
  &.dashboard-container-flex {
    .display-flex();
    .flex-direction(column);
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
  }

  .dashboard .container-fluid {
    padding: 6px;
  }

  .dashboard-flex {
    .flex(1 1 auto);
    overflow-y: scroll;
    overflow-x: hidden;
  }

  .row-container {
    width: 100%;
    min-height: 70px;
  }

  .row-container.is-editing {
    border: 1px solid @cui-gray-100;
  }

  .ui-sortable {
    background-color: @cui-gray-050;
    min-height: 100px;
  }

  .ui-sortable.white {
    background-color: @cui-white !important;
  }

  .ui-sortable h2 {
    padding-left: 10px !important;
  }

  .ui-sortable h2 ul {
    float: left;
    margin-right: 10px;
    font-size: 14px;
  }

  .ui-sortable-disabled {
    background-color: @cui-white;
  }

  .sortable-arguments {
    margin-left: -10px !important;
    width: 99%;
  }

  .sortable-arguments li {
    margin-left: 10px;
  }

  .card-column, .card-additional {
    border: none;
  }

  .card-widget {
    padding-top: 0;
    border: 0;
    min-height: 100px;
    .editable-click.editable-disabled {
      color: @cui-gray-600 !important;
    }
  }

  .card-widget .card-heading {
    font-size: 12px;
    font-weight: bold !important;
    line-height: 24px !important;
    padding-left: 3px !important;
    padding-right: 3px !important;
    background-color: @cui-white;
    border-bottom: 1px solid @cui-gray-100;
  }

  .card-widget .card-body {
    margin-top: 0;
    min-height: 40px;
  }

  .card-toolbar {
    margin: 0;
    padding: 4px;
    padding-top: 0;
    top: 73px;
    position: fixed;
    width: 100%;
    z-index: 1001;
    background-color: @cui-white;
  }

  .row-header {
    background-color: @cui-gray-050;
    display: inline;
    padding: 3px;
    border: 1px solid @cui-gray-100;
    border-bottom: none;
  }

  .row-highlight {
    background-color: @cui-gray-300;
    min-height: 100px;
  }

  .initial-hint {
    position: absolute;
    color: @cui-gray-700;
    font-size: 20px;
    z-index: 1000;
  }

  .empty-dashboard {
    right: 204px;
    top: 80px;
    .initial-hint-text {
      float: left;
      padding-top: 90px;
      margin-right: 20px;
      text-align: center;
      width: 260px
    }
  }

  .empty-dashboard-editing {
    left: 120px;
    top: 160px;
    .initial-hint-text {
      float: right;
      padding-top: 90px;
      margin-left: 20px;
      text-align: center;
      width: 260px;
    }
  }

  .empty-dashboard-plus {
    right: 130px;
    .initial-hint-text {
      float: left;
      margin-top: 120px;
      margin-right: -30px;
      text-align: center;
      width: 280px;
      background: @cui-white;
    }
  }

  .emptyRow {
    margin-top: 10px;
    margin-left: 140px;
    color: @cui-gray-700;
    font-size: 18px;
  }

  .preview-row {
    background-color: @cui-gray-050;
    min-height: 400px !important;
    margin-top: 30px;
    text-align: center;
    color:@cui-gray-300;
  }

  .toolbar-label {
    float: left;
    font-weight: bold;
    color: @cui-gray-600;
    padding-left: 8px;
    padding-top: 24px;
  }

  .draggable-widget {
    width: 40px;
    text-align: center;
    float: left;
    border: 1px solid @cui-gray-400;
    margin-top: 10px;
    margin-left: 10px;
    cursor: move;
    background-color: @cui-white;
  }

  .draggable-widget.disabled {
    cursor: default;
  }

  .draggable-widget a {
    font-size: 20px;
    line-height: 40px;
  }

  .draggable-widget.disabled a {
    cursor: default;
    color: @cui-gray-400;
  }

  .layout-container {
    width: 100px;
    float: left;
    margin-top: 10px;
    margin-left: 10px;
  }

  .layout-box {
    float: left;
    height: 48px;
    background-color: @cui-gray-300;
    text-align: center;
  }

  .layout-box-text {
    width: 100%;
    line-height: 46px;
    margin-left: 4px;
    color: @cui-gray-700;
    font-weight: bold;
  }

  .layout-box i {
    color: @cui-gray-600;
    font-size: 28px;
    line-height: 47px;
  }

  .layout-container:hover .layout-box {
    background-color: @cui-gray-400;
  }

  .droppable-hover {
    background-color: @cui-gray-050 !important;
  }

  .with-top-margin {
    margin-top: 60px;
  }

  .ui-sortable .card-heading {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }

  .form-search .input-append {
    .btn {
      border-radius: 4px !important;
    }
    .flat-left {
      border-top-left-radius: 0 !important;
      border-bottom-left-radius: 0 !important;
      border-left-width: 0;
      margin-left: 0;
    }
  }

  .widget-settings-section {
    display: none;
  }

  .widget-spinner {
    padding: 10px;
    font-size: 80px;
    color: @cui-gray-400;
    text-align: center;
  }

  .move-widget {
    cursor: move;
  }

  body.modal-open {
    overflow: auto !important;
  }

  .add-row-gridster {
    background-color: @cui-gray-050;
    border: 1px solid @cui-gray-200;
    text-align: center;
    padding: 13px;
    color: @cui-gray-500;
  }

  .add-row {
    background-color: @cui-gray-050;
    min-height: 36px;
    border: 2px dashed @cui-gray-300;
    text-align: center;
    padding: 4px;
    cursor: pointer;
  }

  .add-row:before {
    color: @cui-gray-300;
    display: inline-block;
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    font-size: 24px;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    content: "\f055";
  }

  .add-row-highlight {
    min-height: 10px;
    background-color: @cui-gray-400;
  }

  .spinedit-cnt div.spinedit .fa-chevron-up {
    top: -7px;
    color: @cui-gray-700;
  }

  .spinedit-cnt div.spinedit .fa-chevron-down {
    top: 7px;
    left: -4px;
    color: @cui-gray-700;
  }

  .facet-field-cnt {
    margin-bottom: 6px;
  }

  .facet-field-switch {
    display: inline;
    margin-top: 10px;
    margin-left: 3px;
  }

  .facet-field-label {
    color: @cui-gray-800;
    font-size: 11px;
    margin-bottom: 2px;
    margin-right: 4px;
    text-transform: uppercase;
    text-shadow: 1px 1px 0 @cui-white;
  }

  .facet-field-label-fixed-width {
    width: 90px;
    text-align: right;
    padding-right: 8px;
    display: inline-block;
  }

  .facet-field-label-fixed-width-double {
    width: 180px;
  }

  .facet-field-label-title {
    text-align: left;
    font-weight: bold;
    padding-left: 110px;
  }

  .simpledaterangepicker .left-margin {
    margin-left: 6px;
  }

  .facet-field-tile {
    float: left;
  }

  .card-column .simpledaterangepicker .input-prepend {
    margin-left: 3px;
  }

  .card-column.span2 .facet-field-label-fixed-width {
    text-align: left;
    width: auto;
  }

  .card-column.span2 .facet-field-label-title {
    padding-left: 0;
  }

  .card-column.span2 .simpledaterangepicker .facet-field-label-fixed-width {
    display: block;
  }

  .card-column.span2 .simpledaterangepicker .input-prepend {
    display: block;
    margin-bottom: 5px;
  }

  .card-column.span2 .simpledaterangepicker .left-margin {
    margin-left: 0;
  }

  .card-column.span2 .simpledaterangepicker input[type='text'] {
    width: 70%;
  }

  .card-column.span2 .simpledaterangepicker select {
    margin-bottom: 5px;
  }

  .card-widget .input-append, .card-widget .input-prepend, .card-widget select, .card-widget input {
    margin-bottom: 0;
  }

  .card-column.span2 select {
    width: 120px;
  }

  .card-column.span2 .facet-field-tile {
    float: none;
  }

  .responsive-facet-toggle-section {
    margin-bottom: 20px;
  }

  .floating-facet-toggle-section {
    margin-bottom: 20px;
    float: left;
    margin-right: 20px;
  }

  @media (min-width: 1360px) {
    .responsive-facet-toggle-section {
      margin-bottom: 20px;
      float: left;
      margin-right: 20px;
    }
  }

  .dimensions-header {
    border-bottom: none;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 3px;
  }

  .break-on-small-column {
    display: none;
  }

  .card-column.span2 .break-on-small-column {
    display: block;
  }

  .leaflet-bar {
    box-shadow: none;
  }

  .leaflet-align {
    text-align: center;
  }

  .card-column.span2 .leaflet-align {
    text-align: left;
  }

  .logs-icon {
    font-size: 20px;
    margin-right: 17px;
  }

  .card-additional {
    padding: 10px;
    margin-bottom: 10px;
    text-align: center;
  }

  .ace-editor {
    padding-left: 4px;
    border-left: 1px solid @cui-white;
    -webkit-transition: border-left-color 0.2s ease;
    -moz-transition: border-left-color 0.2s ease;
    -ms-transition: border-left-color 0.2s ease;
    transition: border-left-color 0.2s ease;
  }

  .singleValued.form-horizontal .controls {
    margin-left: 65px;
  }

  .text-widget-filter {
    .inline-autocomp-container {
      height: 25px;
    }
    input {
      -webkit-box-sizing: border-box;
      -moz-box-sizing: border-box;
      box-sizing: border-box;
      height: 25px;
      border-radius: 4px;
      opacity: .5;
      .hue-ease-transition(opacity);
      &:hover, &:focus {
        opacity: 1;
      }
    }
  }

  .singleValued.form-horizontal .control-label {
    text-align: left;
    margin-left: 0;
    width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dimensions-badge-container {
    background-color: @cui-gray-050;
    text-shadow: none;
    color: @cui-gray-700;
    border: 1px solid @cui-gray-050;
    margin-right: 10px;
    position: relative;
    display: block;
    float: left;
    font-size: 13px;
    &.is-editing {
      border-color: @cui-blue-700;
    }
    & .metric-form {
      font-size: 12px;
    }
  }

  .dimensions-badge-container-add {
    padding: 4px;
    opacity: 0;
    float: right;
    &.is-adding {
      opacity: 1;
      .action-icon {
        opacity: 1;
      }
    }
  }

  .dimensions-badge {
    display: inline-block;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 4px;
    margin-right: 4px;
  }

  .edit-dimensions {
    padding: 6px;
    .ui-sortable {
      min-height: 0 !important;
      background-color: transparent !important;
    }
    .action-icon {
      opacity: 0;
      display: inline-block;
      color: @cui-gray-500;
      cursor: pointer;
      &:hover {
        color: @cui-gray-700;
      }
    }
    .move-dimension {
      cursor: move;
    }
    &.is-editing {
      opacity: 1 !important;
    }
    &:hover {
      .action-icon {
        opacity: 1;
      }
      .dimensions-badge-container {
        cursor: pointer;
        border-color: @cui-gray-200;
        &.is-editing {
          border-color: @cui-blue-700;
        }
      }
      .dimensions-badge-container-add {
        opacity: 1;
        cursor: pointer;
        border-color: @cui-gray-050;
      }
    }
  }

  .empty-gridster-widget, .html-resultset:hover {
    .edit-dimensions {
      opacity: 1;
      .action-icon, .dimensions-badge-container-add {
        opacity: 1;
      }
      .dimensions-badge-container-add {
        float: left;
      }
    }
  }

  .metric-form {
    position: absolute;
    z-index: 10;
    background-color: @cui-white;
    .hue-box-shadow-bottom;
    padding: 10px;
    margin-top: 8px;
    margin-left: -5px;
    .selectize-control {
      width: 140px;
      margin-top: 4px;
    }
    .context-popover-icon {
      margin-right: 20px;
    }
    .dropdown a.dropdown-toggle {
      padding-left: 0;
    }

  }

  .html-form {
    width: 98%;
    height: 380px;
    margin-top: -35px;
  }

  .empty-gridster-widget {
    .metric-form {
      .selectize-control {
        margin-right: auto;
      }
    }
  }

  .search-bar .form-search {
    .selectize-control {
      width: 220px;
      display: inline-block;
      vertical-align: top;
      border-radius: 0 !important;
      .selectize-input {
        border-radius: 0 !important;
      }
    }
    .simple-ace-single-line {
      border-left: none !important;
    }
  }

  #addFacetDemiModal .inline-autocomp-container {
    width: 220px;
    height: 30px;
  }

  #addFacetDemiModal .inline-autocomp-container .inline-autocomp-input {
    width: calc(100% ~"-" 10px);
  }

  .draggable-plus-button:hover i:before {
    content: "\f047";
  }

  .demi-modal-label {
    float: left;
    font-weight: bold;
    color: @cui-blue-700;
    padding-right: 8px;
    padding-left: 20px;
    padding-top: 5px;
  }
}